package com.lyz.dataStructure.algorithm.beike2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 10:54
 * @Description:
 **/

import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/9/1 10:54
 *@Description:
 **/
public class Main7 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String str1 = sc.nextLine();
        System.out.println(containsStr(str,str1));
    }


    public static int containsStr(String str,String str1) {
        int count=0;
        int d=0;
        while((d=str.indexOf(str1,d))!=-1){
            str=str.substring(d+str1.length());
            count++;
        }
        return count;
    }
}
